// component/add_shop.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    navindex:0,
    nav:[
      { txt: '分类1' },
      { txt: '分类2' },
      { txt: '分类3' },
      { txt: '分类4' },
      { txt: '分类5' },
      { txt:'分类6'},
    ],
    goods: [
      {
        img: "/images/a_30_03.png",
        name: "飞利浦（PHILIPS）迷你车载充电器快充",
        price: "69.0",
        issale: "/images/i_cart.png"
      },
      {
        img: "/images/a_30_03.png",
        name: "飞利浦（PHILIPS）迷你车载充电器快充",
        price: "69.0",
        issale: "/images/i_cart.png"
      },
      {
        img: "/images/a_30_03.png",
        name: "飞利浦（PHILIPS）迷你车载充电器快充",
        price: "69.0",
        issale: "/images/i_cart.png"
      },
      {
        img: "/images/a_30_03.png",
        name: "飞利浦（PHILIPS）迷你车载充电器快充",
        price: "69.0",
        issale: "/images/i_cart.png"
      },
      {
        img: "/images/a_30_03.png",
        name: "飞利浦（PHILIPS）迷你车载充电器快充",
        price: "69.0",
        issale: "/images/i_cart.png"
      },
      {
        img: "/images/a_30_03.png",
        name: "飞利浦（PHILIPS）迷你车载充电器快充",
        price: "69.0",
        issale: "/images/i_cart.png"
      }
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    clickurl: function () {
      wx.navigateTo({
        url: '../goodsDetails/goodsDetails',
      })
    },
    click: function (e) {
      var id = e.currentTarget.dataset.id;
      console.log(id)
      this.setData({
        navindex: id
      })
      // wx.request({
      //   url: '',
      //   data: {
      //   },
      //   success: function (res) {
      //     that.setData({
      //       list: res.data.data
      //     })
      //   }
      // })
    },
  }
})
